<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--
   js中的常见数据类型
    1. number  数值
    2. string  字符串
    3. boolean   布尔型  true  false
    4. object     对象类型
    5. function     函数
    6. undefined     undefined
-->

<script>

    var info;
    console.log("info:",info)

    var number = 1
    console.log("typeof 1 :",typeof number)

    var str = "hello"
    console.log("typeof hello :",typeof str)

    var bln = true
    console.log("typeof true :",typeof bln)

    var un
    console.log("un :",typeof un)

    var obj1 ={
        atuNo:'2109151003',
        stuName:'chenghaoxiang'
    }
    console.log ("obj1:",obj1)
    console.log (typeof obj1)

    var obj2 = new Object()
    obj2.atuNo = '2109151003'
    obj2.atuName = 'chenghaoxiang'
    console.log("obj2:",obj2)
    console.log(typeof obj2)

    // 变量提升过程
    info = "hello"

    // 函数类型     实现代码封装   提升代码复用

    //  参数列表      函数中封装的代码不会自动执行   调用函数
    function fn(num1,num2) {
        var result = num1 +num2
        result = result * 10
        result = result - 5
        return result;
    }
    // 调用函数

    var res = fn(1,2)
    console.log(res)

</script>
</body>
</html>